package com.bkhech.home.practice.spring.el.bean_ref;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;

/**
 * 作用：获取 Bean Factory 的对象
 *
 * @author guowm
 * @date 2023/1/29
 */
public class SpringBeanFactoryBean implements BeanFactoryAware {

    private BeanFactory beanFactory;
    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
        this.beanFactory = beanFactory;
    }

    public BeanFactory getBeanFactory() {
        return beanFactory;
    }
}
